﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.IO;

namespace CloudFilesUpload.Helper
{
    /// <summary/>
    internal static class ResourceHelper
    {
        /// <summary/>
        internal static string Fetch(string typeFullName)
        {
            // fetch the current assembly
            Assembly assembly = Assembly.GetExecutingAssembly();

            using (Stream stream = assembly.GetManifestResourceStream(typeFullName))
            {
                using (StreamReader reader = new StreamReader(stream))
                {
                    // return the contents of the stream
                    return reader.ReadToEnd();
                }
            }
        }
    }
}
